#ifndef __SEQLIST_H__
#define __SEQLIST_H__

typedef struct{
	void *arr;
	int nnum;
	int size;
	int cap;
}seqlist;

typedef void (*pri)(const void *data);
typedef int (*cmp)(const void *data1, const void *data2);

int seqlist_init(seqlist **mylist, int size, int cap);
int seqlist_insert(seqlist *mylist, const void *data);
void *seqlist_find(const seqlist *mylist, const void *data, cmp cmp_t);
void seqlist_show(const seqlist *mylist, pri pri_t);
int seqlist_delete(seqlist *mylist, const void *data, cmp cmp_t);
int seqlist_update(const seqlist *mylist, const void *data1, const void *data2,cmp cmp_t);
void seqlist_destriy(seqlist **mylist);


void my_qsort(seqlist *mylist, int left, int right, cmp cmp_t);


void *seqlist_bsearch(seqlist *mylist, cmp cmp_t, const void *key);
#endif
